The present disclosure relates to computer memory and more particularly to techniques that enable data stored in portions of volatile memory to be persisted across warm boots.
A computer system generally comprises volatile memory and non-volatile memory. Non-volatile memory is a storage subsystem that does not lose its stored data when power is removed from the memory. Examples of non-volatile memory include flash memory, ROM, and a disk subsystem. Volatile memory is memory, such as RAM (e.g., DRAM, SRAM), that loses its stored data when power is shut off to the memory. Volatile memory is also sometimes referred to as the computer's main memory. The operating system and its kernel (e.g., Linux, various Windows operating systems, UNIX), which manages the way different programs use the computer's resources (e.g., hardware resources) and regulates the ways that a user controls the computer, is loaded into the volatile memory upon cold (e.g., power-on reset) or warm boot/start of the computer. For applications or processes executed by a processor of the computer system, data related to and used by the applications/processes is also typically stored in volatile memory (e.g., RAM) associated with the volatile memory for more efficient processing. This application or process-related data may include data structures that are used by the application/process.
There are several occasions when a computer system has to be warm (or soft) booted (as opposed to cold or hard boot when power to the computer is cycled). For example, when an application executing on the computer experiences an error from which it cannot recover (e.g., the error causes the application to hang or become unresponsive), a warm boot may need to be performed for recovery of the application. For example, the Control-Alt-Delete key combination may be used on a desktop computer to perform a warm boot.
Traditionally, a warm boot clears all the contents of the volatile memory (RAM) and restarts the operating system without cycling power to the system. As a result of the warm boot, one or more software components (e.g., applications, processes, etc.) that were executed by the computer system prior to the warm boot may also be restarted. Due to the clearing of the volatile memory as a result of the warm boot, all the application or process-related data that was stored in the volatile memory prior to the warm boot is lost. As a result, when a software component such as an application that was executing prior to the warm boot is restarted as a result of the warm boot, the application has to recreate its application-related data in the volatile memory. This process of recreating the data in volatile memory can take a long time, such as several minutes. This downtime adds to the recovery time for the application from the warm boot.
Some systems try to minimize the recovery time after a warm boot by dumping the application or process-related data to non-volatile memory (such as a hard disk or flash) in response to a warm boot signal before continuing with the warm boot. After a warm boot, the application-related data that has been dumped to non-volatile memory is then read back from the non-volatile memory and reloaded into the volatile memory for use by the restarted application. The use of non-volatile memory however adds to the cost of the system. Further, even such a reloading from non-volatile memory can take upwards of 60 seconds since the data structures still have to be built and loaded into the volatile memory. While such a downtime may be acceptable for some applications, it is not acceptable for several processing/data intensive applications such as networking-related applications that are responsible for processing and forwarding data packets being received at very high frequencies. Due to the high frequencies at which packets are received in today's networks, a downtime of even a few seconds can result in a loss of several data packets (many times in the thousands or millions of packets) resulting in loss of data that may not be acceptable.